{% extends base.html %}
{% block body %}

<div class="col-md-12">
  <form id="searchForm" method="GET" action="{{?action,'/search/search'}}">
      <div class="input-group">
          <input type="text" id="key" name="key" class="searchInput" value="{{?key}}" placeholder="输入指令或搜索关键字" />
          <button class="searchBtn">搜&nbsp;索</button>
      </div>
      <div class="col-md-12">
        <input type="checkbox" name="search_dict" default-value="{{?search_dict}}">词典
        <input type="checkbox" name="content" default-value="{{?content}}">全文搜索
        <input type="checkbox" name="message" default-value="{{?message}}">记事
      </div>
  </form>
</div>

<script type="text/javascript">
$(function () {
  $("#key").focus();

  $("#searchForm [type=checkbox]").change(function () {
    $("#searchForm").submit();
  })
});
</script>

{% include "mod_file_list.html" %}

{% end %}